<div ng-controller='userController'>
	<div class="row">
		<div class="col-sm-12 col-md-12 col-lg-12">
			<h3 class="page-header">出库管理</h3>
			<hr/>
		</div>
	</div>
	<form class="form-inline mb-sm-3 mb-md-3 mb-lg-3">
		<div class="form-group">
			<label>姓名：</label>
			<input class="form-control" id="name" name="name" placeholder="模糊查询">
		</div>
		<div class="form-group mx-sm-1 mx-md-1 mx-lg-1">
			<label>用户名：</label>
			<input class="form-control" id="username" name="username" placeholder="精确查询">
		</div>
		<button class="btn btn-primary" ng-click="clear()">清 空</button>
		<button class="btn btn-primary mx-sm-1 mx-md-1 mx-lg-1" ng-click="getUserByConditions()">查 询</button>
		<button class="btn btn-primary" data-toggle="modal" data-target="#userModal">新 增</button>
	</form>

	<!--查询列表-->
	<table class="table table-bordered table-hover">
		<thead class="bg-primary text-center">
			<tr>
				<th>序号</th>
				<th>姓名</th>
				<th>用户名</th>
				<th>性别</th>
				<th>出生年月</th>
				<th>是否有效</th>
				<th>备注</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>{{$index+1}}</td>
				<td>{{user.name}}</td>
				<td>{{user.username}}</td>
				<td>{{user.sex==0?'男'?'女'}}</td>
				<td>{{user.birthday}}</td>
				<th>{{user.enabled==0?'不可用'?'可用'}}</th>
				<th>{{user.remarks}}</th>
			</tr>
		</tbody>
	</table>

	<!--新增表单-->
	<div class="modal fade" id="userModal" tabindex="-1" role="dialog" data-backdrop="static" aria-hidden="true">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<h5 class="modal-title" id="exampleModalLabel">新增用户</h5>
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
          				<span aria-hidden="true">&times;</span>
       				 </button>
				</div>
				<div class="modal-body">
					<form>
						<div class="form-group row">
							<label class="col-sm-3 col-md-3 col-lg-3 col-form-label">用户名：</label>
							<div class="col-sm-9 col-md-9 col-lg-9">
								<input class="form-control" id="username" name="username" placeholder="必填、5-20位">
							</div>
						</div>
						<div class="form-group row">
							<label class="col-sm-3 col-md-3 col-lg-3 col-form-label">姓名：</label>
							<div class="col-sm-9 col-md-9 col-lg-9">
								<input class="form-control" id="name" name="name" placeholder="必填、2-10位">
							</div>
						</div>
						<div class="form-group row">
							<label class="col-sm-3 col-md-3 col-lg-3 col-form-label">性别：</label>
							<div class="col-sm-9 col-md-9 col-lg-9">
								<select id="sex" name="sex" class="form-control">
									<option value=""></option>
									<option value="0">男</option>
									<option value="1">女</option>
								</select>
							</div>
						</div>
						<div class="form-group row">
							<label class="col-sm-3 col-md-3 col-lg-3 col-form-label">出生年月：</label>
							<div class="col-sm-9 col-md-9 col-lg-9">
								<input class="form-control" id="birthday" name="birthday">
							</div>
						</div>
						<div class="form-group row">
							<label class="col-sm-3 col-md-3 col-lg-3 col-form-label">备注：</label>
							<div class="col-sm-9 col-md-9 col-lg-9">
								<textarea name="remarks" rows="3" class="form-control"></textarea>
							</div>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary">保存</button>
				</div>
			</div>
		</div>
	</div>
</div>